package com.wskj.insuranceweb.reporter.service;

import com.wskj.insuranceweb.reporter.mapper.UserMapper;
import com.wskj.insuranceweb.reporter.pojo.Accident;
import com.wskj.insuranceweb.reporter.pojo.Contract;
import com.wskj.insuranceweb.reporter.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper mapper;


    @Override
    public List<Users> findAll() {
        return mapper.findAll();
    }

    @Override
    public List<Accident> findAccident() {
        return mapper.findAccident();
    }

    @Override
    public List<Users> findAllUsers(String phone, String kname) {
        return mapper.findAllUsers(phone,kname);
    }

    @Override
    public void addUser(Users user) {
        mapper.addUser(user);
    }

    @Override
    public Users getUserById(String cust, String accidentdate) {
       return mapper.getUser(cust,accidentdate);
    }

    @Override
    public Contract findContract() {
        return mapper.findContract();
    }


}
